package com.ruoyi.flowable.entity;

import org.flowable.engine.repository.ProcessDefinition;

import java.util.Date;

/**
 * @program: RuoYi-Vue
 * @description: 流程定义实体
 * @author: jhw
 * @create: 2021-04-09 14:57
 **/
public class FlowableProcessDefinitionEntity {

    private String id;
    private String key;
    private int version;
    private String name;
    private String description;
    private String tenantId;
    private String category;
    private String formKey;
    private boolean graphicalNotationDefined = false;
    private boolean suspended = false;
    private Date deployTime ;
    protected String resourceName;
    protected String diagramResourceName;
    public FlowableProcessDefinitionEntity(ProcessDefinition definition,String formKey) {
        this.id = definition.getId();
        this.key = definition.getKey();
        this.version = definition.getVersion();
        this.name = definition.getName();
        this.description = definition.getDescription();
        this.tenantId = definition.getTenantId();
        this.category = definition.getCategory();
        this.formKey = formKey;
        this.graphicalNotationDefined = definition.hasGraphicalNotation();
        this.suspended = definition.isSuspended();
        this.resourceName = definition.getResourceName();
        this.diagramResourceName  = definition.getDiagramResourceName();
    }

    public Date getDeployTime() {
        return deployTime;
    }

    public void setDeployTime(Date deployTime) {
        this.deployTime = deployTime;
    }

    public String getResourceName() {
        return resourceName;
    }

    public void setResourceName(String resourceName) {
        this.resourceName = resourceName;
    }

    public String getDiagramResourceName() {
        return diagramResourceName;
    }

    public void setDiagramResourceName(String diagramResourceName) {
        this.diagramResourceName = diagramResourceName;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public int getVersion() {
        return version;
    }

    public void setVersion(int version) {
        this.version = version;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getTenantId() {
        return tenantId;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getFormKey() {
        return formKey;
    }

    public void setFormKey(String formKey) {
        this.formKey = formKey;
    }

    public boolean isGraphicalNotationDefined() {
        return graphicalNotationDefined;
    }

    public void setGraphicalNotationDefined(boolean graphicalNotationDefined) {
        this.graphicalNotationDefined = graphicalNotationDefined;
    }

    public boolean isSuspended() {
        return suspended;
    }

    public void setSuspended(boolean suspended) {
        this.suspended = suspended;
    }
}
